//Flyweight.cpp
#include "flyweight.h"
#include <iostream>

Flyweight::Flyweight(std::string intrinsicState)
{
    this->_intrinsicState = intrinsicState;
}

Flyweight::~Flyweight()
{
}

void Flyweight::Operation(const std::string& extrinsicState)
{
}

std::string Flyweight::GetIntrinsicState()
{
    return this->_intrinsicState;
}

ConcreteFlyweight::ConcreteFlyweight(std::string intrinsicState):Flyweight(intrinsicState)
{
    std::cout << "ConcreteFlyweight Build....." << intrinsicState << std::endl;
}

ConcreteFlyweight::~ConcreteFlyweight()
{
}

void ConcreteFlyweight::Operation(const std::string& extrinsicState)
{
    std::cout << "ConcreteFlyweight: [" << this->GetIntrinsicState() << "] [" << extrinsicState << "]" << std::endl;
}


